class GameResult extends eui.Component implements  eui.UIComponent {

	private game_result: eui.Label;

	public constructor() {
		super();
	}

	protected partAdded(partName:string,instance:any):void
	{
		this.getChilds(partName,instance);
		super.partAdded(partName,instance);
	}
	private getChilds(partName:string,instance:any):void{
		switch(partName){
			case "game_result":
				this.game_result = instance;
				break;
			default:
				break;
		}
	}

	protected childrenCreated():void
	{
		super.childrenCreated();
	}
	public setResult(winner:GameUser){
		console.log(this);
		this.game_result.text = "恭喜" + winner.name + "获得了最后的胜利,得分：" + winner.pValue;
	}
	
}